Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #170
A worker's
gateway.tokenno longer reachesdaemon.log, the event ring, orevents.jsonl.redactConfig(config)insrc/core/config.tsreturns a copy with a setgateway.tokenreplaced by[redacted].DaemonServeruses it for thedaemon.startedpayload and theDaemon startedlog line. The payload keeps all its keys, so set and unset still read differently.config.getand the gateway uplink still get the live config, and the token with it.Records written before this fix still hold the token. The release note should tell operators to rotate their join tokens.
Docs: the
daemon.startedrow in both EVENTS.md files, the log contents list indocs/CLI.md, and thegateway.tokenrow indocs/CONFIGURATION.md.Checklist
src/daemon/main.test.ts› "keeps gateway.token out of the daemon log, the events.replay answer, and events.jsonl, while config.get still returns it". This is the triage test, and it now passes.src/daemon/main.test.ts› "keeps gateway.token in the daemon.started payload and the Daemon started log line as the redaction marker…".redactConfigleaves its input untouched, and leaves an unset token unset: the two tests underredactConfiginsrc/core/config.test.ts.pnpm checkpasses.Review
Spec review: 7 findings over two rounds, 2 fixed. Code review: 1 finding, 0 fixed.
Rejected:
docs/CLI.mdanddocs/CONFIGURATION.mdgoes beyond the fix. Rejected: CLI.md said the log holds the effective config, which this change made untrue. CONFIGURATION.md is where users look upgateway.token.REDACTED_VALUEwas not asked for. Rejected: the tests assert the marker by name instead of copying the literal.daemon.logfile. Rejected: the sink is the seamdaemon.logis written through, and the test swaps a memory sink into that seam.[redacted], which is not true of records written before upgrading. Rejected: the docs describe current behaviour, and older records belong in the release note, as above.Written by an agent.